package com.my.hp_hr.service;


import com.my.hp_hr.dao.PositionDao;
import com.my.hp_hr.entity.Position;

import java.util.List;

public class PositionService {
    PositionDao positionDao = new PositionDao();

    public List<Position> listPosition() throws Exception {
       return positionDao.ListPositon();
    }


    public void addPosition(Position position) throws Exception {
        positionDao.addPosition(position);
    }


    public Position getPositionById(String id) throws Exception {
        return positionDao.getPositionById(id);
    }

    public void updatePosition(Position position2) throws Exception {
        positionDao.updatePosition(position2);
    }

    public void delPosition(String id) throws Exception {
        positionDao.delPosition(id);
    }

    public List<Position> getPageList(String pageNo) throws Exception {
      return positionDao.getPageList(pageNo);
    }

    public int getCount() throws Exception {
        return  positionDao.getPageCount();
    }
}
